package com.wqtz.chechai.adapter;

import android.view.View;

import com.wqtz.chechai.R;
import com.wqtz.chechai.base.lvbaseadapter.LvBaseAdapter;
import com.wqtz.chechai.base.lvbaseadapter.ViewHolder;

import java.util.List;

/**
 * 项目名称： CheChai
 * 创建人 : Liberation
 * 创建时间: 2017/2/22 17:22
 */

public class SearchHisAdapter extends LvBaseAdapter<String> {
	private QuoteHisItemClickCallBack mBack;
	public  void setClickListen(QuoteHisItemClickCallBack mBack){
		this.mBack = mBack;
	}


	public SearchHisAdapter(int resId) {
		super(resId);
	}

	@Override
	public void bindDatas(List<String> list, final int position, ViewHolder holder) {
		holder.setText(R.id.tv,list.get(position));
		holder.getViewHolder().setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				mBack.QuoteHisItemClickCallBack(position);
			}
		});
	}
	public interface QuoteHisItemClickCallBack {
		void QuoteHisItemClickCallBack(int positon);
	}

}
